Skip to content

Conversation

@violetagg
Copy link
Member

Introduce PING frame support for proactive connection health monitoring on idle HTTP/2 connections. The feature sends PING frames to detect unresponsive peers and close stale connections.

Configuration via Http2SettingsSpec:

  • pingAckTimeout: Timeout for ACK response
  • pingAckDropThreshold: Maximum PING attempts (default: 1)

Requires idle timeout configuration:

  • Client: ConnectionProvider.maxIdleTime
  • Server: HttpServer.idleTimeout

The feature is opt-in and integrates automatically with connection pool eviction (client) and idle timeout handling (server).

This implementation is based on PR #3612, reduces the scope and adds HttpClient support.

@violetagg violetagg added this to the 1.2.12 milestone Oct 24, 2025
@violetagg violetagg added the type/enhancement A general enhancement label Oct 24, 2025
Introduce PING frame support for proactive connection health monitoring
on idle HTTP/2 connections. The feature sends PING frames to detect
unresponsive peers and close stale connections.

Configuration via Http2SettingsSpec:
- pingAckTimeout: Timeout for ACK response
- pingAckDropThreshold: Maximum PING attempts (default: 1)

Requires idle timeout configuration:
- Client: ConnectionProvider.maxIdleTime
- Server: HttpServer.idleTimeout

The feature is opt-in and integrates automatically with connection
pool eviction (client) and idle timeout handling (server).

This implementation is based on PR #3612, reduces the scope and adds HttpClient support.

Co-authored-by: raccoonback <[email protected]>

Signed-off-by: Violeta Georgieva <[email protected]>
@raccoonback
Copy link
Contributor

@violetagg
I’ll review it by the end of this week! 😀

Copy link
Contributor

@raccoonback raccoonback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@violetagg
I added some comments with a few questions.
I’d appreciate it if you could review them.


@Override
public void operationComplete(ChannelFuture future) {
if (!future.channel().isActive()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the future will be newly created, would it be fine not to check the active state of the current context channel?
(ex. !ctx.channel().isActive())

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate more?

Copy link
Contributor

@raccoonback raccoonback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@violetagg
Copy link
Member Author

@raccoonback Thanks for the review! Let me merge this one.

@violetagg violetagg merged commit a4c7098 into 1.2.x Nov 3, 2025
15 checks passed
@violetagg violetagg deleted the h2-ping branch November 3, 2025 10:32
violetagg added a commit that referenced this pull request Nov 3, 2025
Signed-off-by: Violeta Georgieva <[email protected]>
@violetagg violetagg linked an issue Nov 3, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP/2 PING frame handling

3 participants